import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
const loader = new GLTFLoader();
const model = new THREE.Group();
loader.load('/飞机.glb',(gltf)=>{
    const fly = gltf.scene
    fly.position.set(10,10,0);
    const quaternion = new THREE.Quaternion()
    quaternion.setFromAxisAngle(new THREE.Vector3(1,0,0),Math.PI/2)
    // 改变物体角度的有rotation和quaternion属性，一个改变，另一个也会同步改变
    fly.quaternion.copy(quaternion)
    model.add(fly);

})

export default {model};